package encrypt

// ShiftBackwardUnicode Unicode字符向后移位，即解密
func ShiftBackwardUnicode(crypt string, bit rune) string {
	bst := []rune(crypt)
	nst := make([]rune, len(bst))
	for i, v := range bst {
		b := v - bit
		nst[i] = b
	}
	return string(nst)
}

// ShiftForwardUnicode Unicode字符向前移位，即加密
func ShiftForwardUnicode(str string, bit rune) string {
	bst := []rune(str)
	nst := make([]rune, len(bst))
	for i, v := range bst {
		b := v + bit
		nst[i] = b
	}
	return string(nst)
}
